The Nobel Prize is perhaps the world's most well known scientific award. Except for the honor, prestige and substantial prize money the recipient also gets a gold medal showing Alfred Nobel (1833 - 1896) who established the prize. Every year it's given to scientists and scholars in the categories chemistry, literature, physics, physiology or medicine, economics, and peace. The first Nobel Prize was handed out in 1901, and at that time the Prize was very Eurocentric and male-focused, but nowadays it's not biased in any way whatsoever. Surely.
Well, I'm going to find out! The Nobel Foundation has made a dataset available of all prize winners from the start of the prize, in 1901, to 2016 which I have downloaded.
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
import os
os.system('jupyter nbconvert --to html yourNotebook.ipynb')
# Reading in the Nobel Prize data
data = pd.read_csv(r'C:\Users\Adam\Desktop\Personal\Python Projects\Github\3) Nobel-Prizes\Nobel Prize Data.csv')
data.head()
# 2. So, who gets the Nobel Prize?
Just looking at the first couple of Nobel laureates, Wilhelm Conrad Röntgen can already be seen, the guy who discovered X-rays. And actually, it can be seen that all of the winners in 1901 were guys that came from Europe. But that was back in 1901, looking at all winners in the dataset, from 1901 to 2016, which sex and which country is the most commonly represented?
(For country, I will use the birth_country of the winner, as the organization_country is NaN for all shared Nobel Prizes.)
# Number of (possibly shared) Nobel Prizes handed
# out between 1901 and 2016
print('number of prizes: ' + str(len(data)))
#Number of prizes won by male and female recipients.
print(data.groupby('Sex').Year.count())
#Number of prizes won by the top 10 nationalities.
data['Birth Country'].value_counts().head(10)
Not so surprising perhaps: the most common Nobel laureate between 1901 and 2016 was a man born in the United States of America. But in 1901 all the winners were European. When did the USA start to dominate the Nobel Prize charts?
# Calculating the proportion of USA born winners per decade
data['usa_born_winner'] = data['Birth Country'] == 'United States of America'
data['decade'] = (np.floor(data.Year/10)*10).astype(int)
# The proportions of USA born winners per decade, keeping th ecolumn names for plotting
prop_usa_winners = data.groupby('decade',as_index=False)['usa_born_winner'].mean()
# Setting the plotting theme & size of plots
sns.set()
plt.rcParams['figure.figsize'] = [11, 7]
# Plotting USA born winners
ax = sns.lineplot(x='decade', y='usa_born_winner' , data=prop_usa_winners)
# Adding %-formatting to the y-axis
from matplotlib.ticker import PercentFormatter
ax.yaxis.set_major_formatter(PercentFormatter(1.0))
So the USA became the dominating winner of the Nobel Prize first in the 1930s and had kept the leading position ever since. But one group that was in the lead from the start, and never seems to let go, are men. Maybe it shouldn't come as a shock that there is some imbalance between how many male and female prize winners there are, but how significant is this imbalance? And is it better or worse within specific prize categories like physics, medicine, literature, etc.?
# Calculating the proportion of female laureates per decade
data['female_winner'] = data['Sex'] == 'Female'
prop_female_winners = data.groupby(['decade','Category'],as_index=False)['female_winner'].mean()
# Plotting USA born winners with % winners on the y-axis
ax = sns.barplot(x='decade', y='female_winner' , data=prop_female_winners, hue='Category')
ax.yaxis.set_major_formatter(PercentFormatter(1.0))
The plot above is a bit messy as the lines are overplotting. But it does show some interesting trends and patterns. Overall the imbalance is pretty large with physics, economics, and chemistry having the largest imbalance. Medicine has a somewhat positive trend, and since the 1990s the literature prize is also now more balanced. The big outlier is the peace prize during the 2010s, but keep in mind that this just covers the years 2010 to 2016.
Given this imbalance, who was the first woman to receive a Nobel Prize? And in what category?
Female_winners = data[data.Sex =="Female"]
First_female = Female_winners.nsmallest(1,'Year').reset_index()
print('First female winner: ' + str(First_female['Full Name'][0]) + ' Category: ' + str(First_female['Category'][0]))
# Converting birth_date from String to datetime
data['Birth Date']= pd.to_datetime(data['Birth Date'].astype(str), format='%Y-%m-%d', errors = 'coerce')
# Calculating the age of Nobel Prize winners
data['Age'] = data['Year'] - data['Birth Date'].dt.year
# Plotting the age of Nobel Prize winners
sns.lmplot(x ='Year' , y='Age', data=data , lowess=True, aspect=2, line_kws={'color' : 'black'} )
# Plotting the age of Nobel Prize winners
sns.lmplot(x ='Year' , y='Age', data=data , row='Category', lowess=True, aspect=2, line_kws={'color' : 'black'} )